﻿{#template MAIN}
<table id="gridRoute" cellpadding="5" cellspacing="0" class="grid">
    <thead>
        <th>
            Route #
        </th>
        <th>
            Route Name
        </th>
        <th>
            Description
        </th>
        <th>
            # of Meals
        </th>
        <th>
            Provider's
        </th>
        <th>
            Transport
        </th>
        <th>
            <a class="btnNew" href="/Pages/Operators/RouteItem.aspx">Add</a>
        </th>
    </thead>
    <tbody>
        {#foreach $T.List as route}
        <tr class="{#cycle values=['','evenRow']}">
            {#include ROW root=$T.route}
            <td>
                <a href="/Pages/Operators/RouteItem.aspx?RouteID={$T.route.RouteID}" class="btnEdit">
                    Edit</a> {#if $T.IsAdmin } |&nbsp;<a routeid="{$T.route.RouteID}" class="btnDelete">{#if
                        $T.route.Active }Inactive{#else}Active{#/if}</a> {#/if}
            </td>
        </tr>
        {#/for}
    </tbody>
    <!-- <tfoot>       
      <th colspan="10" >
    Page 
      {#for index = 1 to Math.ceil($T.TotalRecords/$T.PageSize)}
        <input type="button" class={#if $T.index == $T.PageNumber + 1 }"actived pagenumber" {#else}"pagenumber" {#/if} value="{$T.index}" />
      {#/for}
    of {$T.TotalRecords} total records
  </th>
  </tfoot>-->
</table>
{#/template MAIN} {#template ROW}
<td>
    {$T.RouteCode}
</td>
<td>
    {$T.RouteName}
</td>
<td>
    {$T.Description}
</td>
<td>
    {$T.Meals}
</td>
<td>
    {$T.ProviderName}
</td>
<td>
    {#if $T.HasShuttle == true}Shuttle{#/if} {#if $T.HasFlight == true}Flight{#/if}
</td>
{#/template ROW}